{{ if site.Params.features.comment.giscus }}
  {{ $config := site.Params.features.comment.giscus }}
  <script src="https://giscus.app/client.js"
          data-repo="{{$config.repo}}"
          data-repo-id="{{$config.repo_id}}"
          data-category="{{$config.category}}"
          data-category-id="{{$config.category_id}}"
          data-mapping="{{ $config.mapping | default "pathname" }}"
          data-strict="0"
          data-reactions-enabled="1"
          data-emit-metadata="0"
          data-input-position="top"
          data-theme="{{ $config.theme | default "preferred_color_scheme" }}"
          data-lang="{{ $config.language_code | default "en" }}"
          data-loading="lazy"
          crossorigin="anonymous"
          async>
  </script>
{{ end }}
